<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>

        class Person {
            constructor(name,age) {
                this.name = name;
                this.age = age;
                
            }

            getName(){
                console.log(this.name);
                
            }

            static info(){
                console.log("是个人物");
                
            }
        }

        class Student extends Person{
            constructor(name,age,school){
                super(name,age);
                this.school = school;
            }

            getSchool(){
                console.log(this.school);
                
            }
        }

        var p = new Person("liwancai",20);
        var std = new Student("zhangjianwei",19,"赤峰高中");
        std.getSchool();
        Student.info();
    </script>
</body>
</html>